A Simple Mechanism For Complex Social Behavior